import JJHomepagePresenter from './presenter/JJHomepagePresenter.js'

const app = getApp()

Page({
    data: {
    },

    homepagePresenter: new JJHomepagePresenter(),

    onLoad: function () {
        const data = { ...this.homepagePresenter.homepageData };
        this.setData(data);

        const me = this
        this.homepagePresenter.requestWeather(function (isSuccess, value, otherInfo) {
            const data = { ...me.homepagePresenter.homepageData };
            me.setData(data);
        }, function (error, otherInfo) {
            const data = { ...me.homepagePresenter.homepageData };
            me.setData(data);
        })
    },
    getUserInfo: function (e) {
        wx.navigateTo({
            url: '../test/test'
        })
    }
})
